package Entity;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table (name = "Area")
public class AreaEntity implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column (name = "idArea")
	private int id;
	
	@Column (name = "nombre")
	private String nombre;
	
	@Column (name = "HorasPreparacion")
	private int horasPreparacion;
	
	@OneToOne
	@JoinColumn (name = "idDeposito")
	private DepositoAreaEntity Deposito;
	
	//@ManyToMany (mappedBy = "areas")
/*	@JoinTable (name = "AreaSucursal", joinColumns = {
	@JoinColumn (name = "idArea")})*/
	//private int idSucursal;
	//private	 List<SucursalesEntity> sucursal = new ArrayList<SucursalesEntity>();

	public int getId() {
		return id;
	}

	public DepositoAreaEntity getDeposito() {
		return Deposito;
	}

	public void setDeposito(DepositoAreaEntity deposito) {
		Deposito = deposito;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	public int getHorasPreparacion() {
		return horasPreparacion;
	}

	public void setHorasPreparacion(int horasPreparacion) {
		this.horasPreparacion = horasPreparacion;
	}
		
}
